package com.ge.energy.pgs.myfleet.code.servlet.websocketservlet;

import javax.servlet.http.HttpServletRequest;
import org.eclipse.jetty.websocket.WebSocket;
import org.eclipse.jetty.websocket.WebSocketServlet;
import com.ge.energy.pgs.myfleet.code.servlet.websocket.MyWebSocket;



public class MyWebSocketServlet extends WebSocketServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public WebSocket doWebSocketConnect(HttpServletRequest request, String requestStr) {
		System.out.println("create new webSocket.....");
		String user1d = request.getParameter("user1d");
		String pa55word = request.getParameter("pa55word");
		System.out.println("user1d====:" + user1d+"    pa55word==:" +pa55word);
		System.out.println("create new webSocket1");
		System.out.println("requestStr:"+requestStr);
		return new MyWebSocket(user1d,pa55word,requestStr);
	}

}
